<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/admin.css'); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo $this->_webroot('skin/css/main.css'); ?>">
<script type='text/javascript' src="<?php echo $this->_webroot('skin/js/jy.js'); ?>"></script>
<style>
td span {color:red;}
.green {color:green;}
.red {color:red;}
#divname{float:left; margin:0px;}
</style>
</head>
<body>
<input type="hidden" id="update_right" value="1" ></input>
<div id="maincontent">
	<div class="wrap">
    <div class="crumbs">当前位置 &gt;&gt; 交易管理 &gt;&gt; 投诉列表</div>
        <hr />

	<div class="infobox">
	<h3>投诉列表</h3>
    <div class="content2">
		<form action="a.php?act=lock_shop" name="form1" id="form1" method="post">
		<table class="list_table">
		  <thead>
            <tr style="text-align:center;">
				<th width="2px"><input type="checkbox" value="" onclick="checkall(this,'type_id[]');"></th>
				<th width="60px">投诉人</th>
				<th width="110px" align="left">被投诉人</th>
				<th width="150px" align="left">相关商品</th>
				<th width="100px" align="left">投诉原因</th>
				<th width="200px" align="left">投诉内容</th>
				<th width="150px" align="left">操作</th>
			</tr>
			</thead>
			<tbody>
			<?php if($result['data'] ) {
			foreach($result['data']  as $value) { ?>
			<tr style="text-align:center;">
				<td><input type="checkbox" name="type_id[]" value="<?php echo $value['complaint']['id'];?>" /></td>
				<td><?php echo $value['user']['username'];?></td>
				<td align="left"><a href="../shop.php?shopid=<?php echo  $value['complaint']['usered_id'];?>&app=index" target="_blank"><?php echo $value['complaint']['usered_name'];?></a></td>
				<td align="left"><a href="../goods.php?id=<?php echo $value['complaint']['goods_id'];?>" target="_blank"><?php echo $value['complaint']['goods_name'];?></a></td>
				<td align="left"><?php echo $value['complaint']['complaints_title'];?></td>
				<td align="left"><?php echo $value['complaint']['complaints_content'];?></td>
				<td align="left">
				 	<?php if($value['user']['locked']==0){?>
					<a href="<?php echo $this->_url('admin/user/locked/?');?>id=<?php echo $value['complaint']['usered_id'];?>" onclick="return confirm('锁定后会员将不能登陆，确认要锁定吗?');">
						被检举人已被锁定
					</a>
					<?php } else { ?>
					<font color="red">锁定被检举人</font>
					<?php } ?>
					<br />
					 <?php if($value['goods']['lock_flg']==0){?>
					<a href="<?php echo $this->_url('admin/goods/lockgoods/?');?>id=<?php echo $value['complaint']['goods_id']; ?>&v=1" onclick="return confirm('确定要执行此操作吗？')">
						被检举商品已被锁定
					</a>
					<?php } else { ?>
					<font color="red">锁定被检举商品</font>
					<?php } ?>
				| <a href="<?php echo $this->_url('admin/complaint/del/'.$value['complaint']['id']);?>">删除</a></td>
			</tr>
			<?php }?>
			<tr>
				<td colspan="13" class="center">
					<a href="<?php echo $result['page']['head'];?>">首页</a> 
                            <a href="<?php echo $result['page']['prevPage'];?>">上一页</a> 
                            <?php foreach($result['page']['plist'] as $k => $v ) { ?>							
                            <a href="<?php echo $v; ?>"><?php echo $k; ?></a>
							<?php } ?>
                            <a href="<?php echo $result['page']['nextPage'];?>">下一页</a> 
                            <a href="<?php echo $result['page']['foot'];?>">尾页</a> 
                            当前第<?php echo $result['page']['current']['num'];?>页/共<?php echo $result['page']['pageCount'];?>页						
				</td>
			</tr>
			<?php } else { ?>
			<tr>
				<td colspan="9">暂无信息</td>
			</tr>
			<?php } ?>
			</tbody>
		</table>
		</form>
	  </div>
	 </div>		

		
	
	</div>
</div>
<script language="JavaScript" src="<?php echo $this->_webroot('servtools/ajax_client/ajax.js'); ?>"></script>
<script language="JavaScript">
<!--
var inputs = document.getElementsByTagName("input");
function submitform() {
	var status = document.getElementsByName("status")[0];
	var checknum = 0;
	if(status.value==0) {
		ShowMessageBox("请选择您要设置的状态",'0');
		return false;
	} else {
		for(var i=0; i<inputs.length; i++) {
			if(inputs[i].type=='checkbox') {
				if(inputs[i].checked) {
					checknum++;
				}
			}
		}
		if(checknum==0) {
			ShowMessageBox(" 致少要选择一项，才能进行操作！",'0');
			return false;
		}
	}
	return true;
}

//-->
</script>
</body>
</html>